package cn.shyouchi.wuguanjia.android.ui.patrolstatistic;

import android.content.Intent;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import cn.shyouchi.wuguanjia.android.R;
import cn.shyouchi.wuguanjia.android.ui.patrol.statistic.PatrolTotalStatisticActivity;
import cn.shyouchi.wuguanjia.android.ui.statistic.SignStatisticManagerEntity;

/**
 * Created by Eenie on 2016/12/13 at 16:56
 * Email: 472279981@qq.com
 * Des:
 */

public class PatrolStatisticManagerAdapter extends BaseQuickAdapter<SignStatisticManagerEntity.ResultMessageBean, BaseViewHolder> {
    public PatrolStatisticManagerAdapter(List<SignStatisticManagerEntity.ResultMessageBean> data) {
        super(R.layout.item_sign_statistc_layout, data);
    }

    @Override
    protected void convert(BaseViewHolder holder, final SignStatisticManagerEntity.ResultMessageBean entity) {


        holder.setText(R.id.tv_event_name, entity.getProjectname());

        holder.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent(mContext, PatrolTotalStatisticActivity.class);
                intent.putExtra("projectid", String.valueOf(entity.getId()));
                mContext.startActivity(intent);
            }
        });
    }
}
